import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import WindiCSS from 'vite-plugin-windicss'

import path from "path"

// https://vite.dev/config/

export default defineConfig({
  resolve:{
    alias:{
      "@":path.resolve(__dirname,"src")

    }
  },    
  devServer: {
    headers: {
      'Content-Security-Policy': "script-src 'self' 'wasm-unsafe-eval' 'inline-speculation-rules' chrome-extension://ca49d196-9dfc-43e8-afa2-4ef97055f755/assets/content.js-c291afc4.js"
    }
  },
  
  plugins: [vue(),WindiCSS(),],
  server:{
    // port:5000,
    
     host:"0.0.0.0",
     
    proxy:{
      "/api":{
        target:"http://123.56.41.4:5000/",
        changeOrigin:true,
        rewrite:(path)=>path.replace(/^\/api/,"")
    },
  }
},


 
})